#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctime>

#include "WeightSensor.h"

WeightSensor* weightSensorConstruct()
{
	WeightSensor *weightSensor;
	weightSensor = (WeightSensor*) malloc(sizeof(WeightSensor));
	weightSensor->weight = 0;
	return weightSensor;
}

void weightSensorDeconstruct(WeightSensor *weightSensor)
{
	free(weightSensor);
}

void measureWeight(WeightSensor *weightSensor)
{
	srand(time(NULL));
	weightSensor->weight = rand() % 2000 + 1;
}